<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CANopenNode: Emergency</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CANopenNode
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group__CO__Emergency.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#files">Files</a> &#124;
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Emergency<div class="ingroups"><a class="el" href="group__CO__CANopen__301.html">CANopen_301</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:CO__Emergency_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="CO__Emergency_8h.html">CO_Emergency.h</a></td></tr>
<tr class="memdesc:CO__Emergency_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopen Emergency protocol. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__EM__t.html">CO_EM_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Emergency object.  <a href="structCO__EM__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gab66d4a6daa5f7492704b56a46b135f71"><td class="memItemLeft" align="right" valign="top"><a id="gab66d4a6daa5f7492704b56a46b135f71"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#gab66d4a6daa5f7492704b56a46b135f71">CO_errorReport</a>(em,  errorBit,  errorCode,  infoCode)&#160;&#160;&#160;<a class="el" href="group__CO__Emergency.html#ga9221f9f631ead4b6f66cfcff8614ba46">CO_error</a>(em, <a class="el" href="group__CO__dataTypes.html#ga41f9c5fb8b08eb5dc3edce4dcb37fee7">true</a>, errorBit, errorCode, infoCode)</td></tr>
<tr class="memdesc:gab66d4a6daa5f7492704b56a46b135f71"><td class="mdescLeft">&#160;</td><td class="mdescRight">Report error condition, for description of parameters see <a class="el" href="group__CO__Emergency.html#ga9221f9f631ead4b6f66cfcff8614ba46">CO_error</a>. <br /></td></tr>
<tr class="separator:gab66d4a6daa5f7492704b56a46b135f71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga24e2a9311cf704ec6ed43b0ea730c4a3"><td class="memItemLeft" align="right" valign="top"><a id="ga24e2a9311cf704ec6ed43b0ea730c4a3"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#ga24e2a9311cf704ec6ed43b0ea730c4a3">CO_errorReset</a>(em,  errorBit,  infoCode)&#160;&#160;&#160;<a class="el" href="group__CO__Emergency.html#ga9221f9f631ead4b6f66cfcff8614ba46">CO_error</a>(em, <a class="el" href="group__CO__dataTypes.html#ga65e9886d74aaee76545e83dd09011727">false</a>, errorBit, <a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02aa60e1333102cbe544eccbaad8e77f6f7">CO_EMC_NO_ERROR</a>, infoCode)</td></tr>
<tr class="memdesc:ga24e2a9311cf704ec6ed43b0ea730c4a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset error condition, for description of parameters see <a class="el" href="group__CO__Emergency.html#ga9221f9f631ead4b6f66cfcff8614ba46">CO_error</a>. <br /></td></tr>
<tr class="separator:ga24e2a9311cf704ec6ed43b0ea730c4a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga2cfc261cce03577083ee3f1a31d5e03c"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#ga2cfc261cce03577083ee3f1a31d5e03c">CO_errorRegister_t</a> { <br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga2cfc261cce03577083ee3f1a31d5e03ca92a7e121ae04a022fc2fe604eb1c148e">CO_ERR_REG_GENERIC_ERR</a> = 0x01U, 
<a class="el" href="group__CO__Emergency.html#gga2cfc261cce03577083ee3f1a31d5e03ca61eded29fb0fcd95b2f66c2682de0f2b">CO_ERR_REG_CURRENT</a> = 0x02U, 
<a class="el" href="group__CO__Emergency.html#gga2cfc261cce03577083ee3f1a31d5e03ca360c75e04303d1c55e2bc8528407cb87">CO_ERR_REG_VOLTAGE</a> = 0x04U, 
<a class="el" href="group__CO__Emergency.html#gga2cfc261cce03577083ee3f1a31d5e03cab12f2b419af0aeb8aae83a13d5c8b7bf">CO_ERR_REG_TEMPERATURE</a> = 0x08U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga2cfc261cce03577083ee3f1a31d5e03ca2f3b7aeac7282281c1d17895406c006a">CO_ERR_REG_COMMUNICATION</a> = 0x10U, 
<a class="el" href="group__CO__Emergency.html#gga2cfc261cce03577083ee3f1a31d5e03cab137d1705e9ab20e2caeb22f57dd4716">CO_ERR_REG_DEV_PROFILE</a> = 0x20U, 
<a class="el" href="group__CO__Emergency.html#gga2cfc261cce03577083ee3f1a31d5e03caffdf7f5d9f9ae52fa1bf97a3fb3d848b">CO_ERR_REG_RESERVED</a> = 0x40U, 
<a class="el" href="group__CO__Emergency.html#gga2cfc261cce03577083ee3f1a31d5e03ca207eee1d9638f61166bc395ee71b84a3">CO_ERR_REG_MANUFACTURER</a> = 0x80U
<br />
 }</td></tr>
<tr class="memdesc:ga2cfc261cce03577083ee3f1a31d5e03c"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopen Error register.  <a href="group__CO__Emergency.html#ga2cfc261cce03577083ee3f1a31d5e03c">More...</a><br /></td></tr>
<tr class="separator:ga2cfc261cce03577083ee3f1a31d5e03c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0653c307fd6bc5238babf48e01c9fa02"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#ga0653c307fd6bc5238babf48e01c9fa02">CO_EM_errorCode_t</a> { <br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02aa60e1333102cbe544eccbaad8e77f6f7">CO_EMC_NO_ERROR</a> = 0x0000U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a2eaf45ca12b32b7bcc58df91becda767">CO_EMC_GENERIC</a> = 0x1000U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02abad9ca04a37cc43cacabfef9483699cf">CO_EMC_CURRENT</a> = 0x2000U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02ab792c971a569d1175666b3fff9ffbe70">CO_EMC_CURRENT_INPUT</a> = 0x2100U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a3ded1c05cbf37d2d7d286af97e833e65">CO_EMC_CURRENT_INSIDE</a> = 0x2200U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02ad42e8ab666fd3da75d1fa3a7b8708efc">CO_EMC_CURRENT_OUTPUT</a> = 0x2300U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a84a8f0dfb97e0ec13be9a4cdb0d71233">CO_EMC_VOLTAGE</a> = 0x3000U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02ab4b095d1d9e7e7f5150bc2ecd83bc140">CO_EMC_VOLTAGE_MAINS</a> = 0x3100U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a78dfa1d496a010ae7ae2e8b6edc1362a">CO_EMC_VOLTAGE_INSIDE</a> = 0x3200U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a9c5becd591c91bb3e255badf0a308c2d">CO_EMC_VOLTAGE_OUTPUT</a> = 0x3300U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02aa24dfa4c6948187f62d3e8182285d4a3">CO_EMC_TEMPERATURE</a> = 0x4000U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02ae5256d8178374a48750537c3d04c0a30">CO_EMC_TEMP_AMBIENT</a> = 0x4100U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a6c29a4b49fae39b45c5c0e553ef6668f">CO_EMC_TEMP_DEVICE</a> = 0x4200U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a33344d49b9667151d86aef28a73e6f66">CO_EMC_HARDWARE</a> = 0x5000U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a6d0b3c0c31228e0bc57fc080c754fefa">CO_EMC_SOFTWARE_DEVICE</a> = 0x6000U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a62e0949639733e85c2b6d4c8b099d467">CO_EMC_SOFTWARE_INTERNAL</a> = 0x6100U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a7b6ae38c015688128890bfe42b0271e5">CO_EMC_SOFTWARE_USER</a> = 0x6200U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02ad22329fc3e44867a365401458e691ddc">CO_EMC_DATA_SET</a> = 0x6300U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02ae210dc1069c7b046527f7d7903ef82cb">CO_EMC_ADDITIONAL_MODUL</a> = 0x7000U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a8ecd7e45af52d83d986e3de8e957a986">CO_EMC_MONITORING</a> = 0x8000U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02aab2946bf800f551bcae55dd299ff315b">CO_EMC_COMMUNICATION</a> = 0x8100U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a1f04b4ffe9cc1d8f2b294261909dec4e">CO_EMC_CAN_OVERRUN</a> = 0x8110U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02aa024c00c21f705474355b9ca7d7ce948">CO_EMC_CAN_PASSIVE</a> = 0x8120U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02aff47b500e2e760355ca653b247e4b93f">CO_EMC_HEARTBEAT</a> = 0x8130U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a2fd717ed311007b4dd6fe92443f134b0">CO_EMC_BUS_OFF_RECOVERED</a> = 0x8140U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a683bff5350b0cbab24aef2fc8eac363a">CO_EMC_CAN_ID_COLLISION</a> = 0x8150U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02ab884b23b23af9671d99cca5865549e5a">CO_EMC_PROTOCOL_ERROR</a> = 0x8200U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a80fedd7bbb98ddf1ec26d4b31ed6d749">CO_EMC_PDO_LENGTH</a> = 0x8210U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a88bac871b7539a579fba73825a2e240a">CO_EMC_PDO_LENGTH_EXC</a> = 0x8220U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02ab58df03302ab06710f7455d37039dea3">CO_EMC_DAM_MPDO</a> = 0x8230U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a81aa2a66727d1fe29720067dc4e20879">CO_EMC_SYNC_DATA_LENGTH</a> = 0x8240U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a4ca48c8d1be6a42ac0c13e551e12b230">CO_EMC_RPDO_TIMEOUT</a> = 0x8250U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a018485be8125a3515ecd127a08e2e2f1">CO_EMC_TIME_DATA_LENGTH</a> = 0x8260U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a1d76eff88ebd6050377c393533aebc8d">CO_EMC_EXTERNAL_ERROR</a> = 0x9000U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02af5f9446049023ceae559562998172278">CO_EMC_ADDITIONAL_FUNC</a> = 0xF000U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02ad7b895b5e7d0f3fa7ff422157ac36c70">CO_EMC_DEVICE_SPECIFIC</a> = 0xFF00U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02aa432d9c66bb0f6eecc38d720cae6c32e">CO_EMC401_OUT_CUR_HI</a> = 0x2310U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a182a0c7afc0cb1c30af42a05430da353">CO_EMC401_OUT_SHORTED</a> = 0x2320U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a21cd31a1455c9dc379796798f0eecd32">CO_EMC401_OUT_LOAD_DUMP</a> = 0x2330U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02aacdc3517e800b037b46c1b54f454b562">CO_EMC401_IN_VOLT_HI</a> = 0x3110U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a867eb16fce01ade3c728df7c7527e311">CO_EMC401_IN_VOLT_LOW</a> = 0x3120U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a9cd0f1a897f40a3a43198ba05de4a11b">CO_EMC401_INTERN_VOLT_HI</a> = 0x3210U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02ac122203ed5c6a71749ace599b13ac594">CO_EMC401_INTERN_VOLT_LO</a> = 0x3220U, 
<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02abf5b6a68120351c2fa52146b45798ed2">CO_EMC401_OUT_VOLT_HIGH</a> = 0x3310U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga0653c307fd6bc5238babf48e01c9fa02a5f262e622db7482b7230055e5b27c902">CO_EMC401_OUT_VOLT_LOW</a> = 0x3320U
<br />
 }</td></tr>
<tr class="memdesc:ga0653c307fd6bc5238babf48e01c9fa02"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopen Error code.  <a href="group__CO__Emergency.html#ga0653c307fd6bc5238babf48e01c9fa02">More...</a><br /></td></tr>
<tr class="separator:ga0653c307fd6bc5238babf48e01c9fa02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga587034df9d350c8e121c253f1d4eeacc"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#ga587034df9d350c8e121c253f1d4eeacc">CO_EM_errorStatusBits_t</a> { <br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccafb7b06b4b1d4fb2f9fa8661fdbaf8b01">CO_EM_NO_ERROR</a> = 0x00U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca27ebb7f155d4b72618c34dd6aa496aac">CO_EM_CAN_BUS_WARNING</a> = 0x01U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccae1e45de61059459a6f1f6e500962f287">CO_EM_RXMSG_WRONG_LENGTH</a> = 0x02U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca0b17027ee0097065d92e6c0981e3face">CO_EM_RXMSG_OVERFLOW</a> = 0x03U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca2a36480d4dd6a24f1f8bb66d79441a8d">CO_EM_RPDO_WRONG_LENGTH</a> = 0x04U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca73426de91d49273d023b5084a0cea8e0">CO_EM_RPDO_OVERFLOW</a> = 0x05U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccaab5efa11cefb2cd6125cec3ec1c570e1">CO_EM_CAN_RX_BUS_PASSIVE</a> = 0x06U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccadb8502da626d80a8c423e94e1c76d0cb">CO_EM_CAN_TX_BUS_PASSIVE</a> = 0x07U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccac5f82aeeda52c83eee0025c8b387ac5d">CO_EM_NMT_WRONG_COMMAND</a> = 0x08U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca5c1a6209ebe6167bbf13f565b6fd994d">CO_EM_TIME_TIMEOUT</a> = 0x09U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca3af179820ed2aa88e2c22b7961de71f8">CO_EM_TIME_LENGTH</a> = 0x0AU, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca8bf6fb0db21e29e477b38304279bed5e">CO_EM_0B_unused</a> = 0x0BU, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccaa724f4fdeff7043b0d4f454613a96992">CO_EM_0C_unused</a> = 0x0CU, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca933c070fd08c1223462a3a331b016c99">CO_EM_0D_unused</a> = 0x0DU, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca0cabb2e45202f938cfdafe8e7871f4f7">CO_EM_0E_unused</a> = 0x0EU, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccac6469cc3e6176136f69e549c4a4f5b71">CO_EM_0F_unused</a> = 0x0FU, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca274f46ac0760c4c340f48d1de884f2fe">CO_EM_10_unused</a> = 0x10U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca9d8abe2f426ed071febf85a932c1df98">CO_EM_11_unused</a> = 0x11U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccae59f8e20795915a0929861809ed42e7c">CO_EM_CAN_TX_BUS_OFF</a> = 0x12U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccaf9a86c6c3b87763593dd14be6b0bef29">CO_EM_CAN_RXB_OVERFLOW</a> = 0x13U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca2dbceee7b6deae231bb40a96f8f748a9">CO_EM_CAN_TX_OVERFLOW</a> = 0x14U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccaea141284cd85126a9b3e7b0605a26a94">CO_EM_TPDO_OUTSIDE_WINDOW</a> = 0x15U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca865160ae9fdac8fcba1e5335b31c2f9f">CO_EM_16_unused</a> = 0x16U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccad5bb584bb3c85ca0ba0313367aa75a9b">CO_EM_17_unused</a> = 0x17U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccafd760392f4d4d6358896486c5b5d7d82">CO_EM_SYNC_TIME_OUT</a> = 0x18U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca09a521bfc9ea08ed340cfa29952a471c">CO_EM_SYNC_LENGTH</a> = 0x19U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca7308b487766b8feca60ef0c1b873f167">CO_EM_PDO_WRONG_MAPPING</a> = 0x1AU, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca6478d414ea45f6a9129e68a9d57e11b7">CO_EM_HEARTBEAT_CONSUMER</a> = 0x1BU, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca0b6698662476cc622661fb5a5a75ec31">CO_EM_HB_CONSUMER_REMOTE_RESET</a> = 0x1CU, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca6d0bf9c926241ec8f67c477928300761">CO_EM_1D_unused</a> = 0x1DU, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccab2f3562c4e1f8e25a7837627dc1721db">CO_EM_1E_unused</a> = 0x1EU, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccadba4afb9dac78f8eb0c5f494926568b1">CO_EM_1F_unused</a> = 0x1FU, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccabd1935c51679f70f509ffd60e28c02b1">CO_EM_EMERGENCY_BUFFER_FULL</a> = 0x20U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccadbce7bd9d5a0ee681104914092b21d8d">CO_EM_21_unused</a> = 0x21U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccacb69eecc08e72c56aec215fa55e27e16">CO_EM_MICROCONTROLLER_RESET</a> = 0x22U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccaa0c8857afdd8455b30fd0179e98599fb">CO_EM_23_unused</a> = 0x23U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca9cf88b48355b3cc43fe9a8360b8470df">CO_EM_24_unused</a> = 0x24U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca0a8abc6fcd7b0d5469b469c2cf370a82">CO_EM_25_unused</a> = 0x25U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca0398195eafec5f8d60a76f677ce2a714">CO_EM_26_unused</a> = 0x26U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca95ca6848349affc579fff2c2a62e87d7">CO_EM_27_unused</a> = 0x27U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca2d7776243205bc75e6c448e13e697480">CO_EM_WRONG_ERROR_REPORT</a> = 0x28U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccadbf7382f537c9f59f965ce38be464e46">CO_EM_ISR_TIMER_OVERFLOW</a> = 0x29U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca2575dac21ff9ac9c4c4e5ca63d34fdbc">CO_EM_MEMORY_ALLOCATION_ERROR</a> = 0x2AU, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca21648a2863590d3cccb469f8ef759267">CO_EM_GENERIC_ERROR</a> = 0x2BU, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca6c3e7fff310443f05815ea2b7ac6b289">CO_EM_GENERIC_SOFTWARE_ERROR</a> = 0x2CU, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca2c6a108cabca6f03b1400065f2ad4887">CO_EM_INCONSISTENT_OBJECT_DICT</a> = 0x2DU, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca5544a90d3047bc08186ea7412528dc93">CO_EM_CALCULATION_OF_PARAMETERS</a> = 0x2EU, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccac019532cacaa8310f9ca413a2f599af3">CO_EM_NON_VOLATILE_MEMORY</a> = 0x2FU, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeaccaf850a661aadde65b10b22715cf24942c">CO_EM_MANUFACTURER_START</a> = 0x30U, 
<a class="el" href="group__CO__Emergency.html#gga587034df9d350c8e121c253f1d4eeacca5d3c6fdb77551b3f4aaf993ae1dfb414">CO_EM_MANUFACTURER_END</a> = CO_CONFIG_EM_ERR_STATUS_BITS_COUNT - 1
<br />
 }</td></tr>
<tr class="memdesc:ga587034df9d350c8e121c253f1d4eeacc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Error status bits.  <a href="group__CO__Emergency.html#ga587034df9d350c8e121c253f1d4eeacc">More...</a><br /></td></tr>
<tr class="separator:ga587034df9d350c8e121c253f1d4eeacc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga5b80f59df00b71dca7a5c18c139aa71e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#ga5b80f59df00b71dca7a5c18c139aa71e">CO_EM_init</a> (<a class="el" href="structCO__EM__t.html">CO_EM_t</a> *em, const <a class="el" href="structOD__entry__t.html">OD_entry_t</a> *OD_1001_errReg, const <a class="el" href="structOD__entry__t.html">OD_entry_t</a> *OD_1014_cobIdEm, <a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANdevTx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANdevTxIdx, const <a class="el" href="structOD__entry__t.html">OD_entry_t</a> *OD_1015_InhTime, const <a class="el" href="structOD__entry__t.html">OD_entry_t</a> *OD_1003_preDefErr, const <a class="el" href="structOD__entry__t.html">OD_entry_t</a> *OD_statusBits, <a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANdevRx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANdevRxIdx, const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeId)</td></tr>
<tr class="memdesc:ga5b80f59df00b71dca7a5c18c139aa71e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Emergency object.  <a href="group__CO__Emergency.html#ga5b80f59df00b71dca7a5c18c139aa71e">More...</a><br /></td></tr>
<tr class="separator:ga5b80f59df00b71dca7a5c18c139aa71e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga94efd78032de3667e2a89780b08aabed"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#ga94efd78032de3667e2a89780b08aabed">CO_EM_initCallbackPre</a> (<a class="el" href="structCO__EM__t.html">CO_EM_t</a> *em, void *object, void(*pFunctSignal)(void *object))</td></tr>
<tr class="memdesc:ga94efd78032de3667e2a89780b08aabed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Emergency callback function.  <a href="group__CO__Emergency.html#ga94efd78032de3667e2a89780b08aabed">More...</a><br /></td></tr>
<tr class="separator:ga94efd78032de3667e2a89780b08aabed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga583245c954327c3cf7f9fdb97854e76b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#ga583245c954327c3cf7f9fdb97854e76b">CO_EM_initCallbackRx</a> (<a class="el" href="structCO__EM__t.html">CO_EM_t</a> *em, void(*pFunctSignalRx)(const <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> ident, const <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> errorCode, const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> errorRegister, const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> errorBit, const <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> infoCode))</td></tr>
<tr class="memdesc:ga583245c954327c3cf7f9fdb97854e76b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Emergency received callback function.  <a href="group__CO__Emergency.html#ga583245c954327c3cf7f9fdb97854e76b">More...</a><br /></td></tr>
<tr class="separator:ga583245c954327c3cf7f9fdb97854e76b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga93ae7be6ef966192f5761ce343345d3b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#ga93ae7be6ef966192f5761ce343345d3b">CO_EM_process</a> (<a class="el" href="structCO__EM__t.html">CO_EM_t</a> *em, <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> NMTisPreOrOperational, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> timeDifference_us, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *timerNext_us)</td></tr>
<tr class="memdesc:ga93ae7be6ef966192f5761ce343345d3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process Error control and Emergency object.  <a href="group__CO__Emergency.html#ga93ae7be6ef966192f5761ce343345d3b">More...</a><br /></td></tr>
<tr class="separator:ga93ae7be6ef966192f5761ce343345d3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9221f9f631ead4b6f66cfcff8614ba46"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#ga9221f9f631ead4b6f66cfcff8614ba46">CO_error</a> (<a class="el" href="structCO__EM__t.html">CO_EM_t</a> *em, <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> setError, const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> errorBit, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> errorCode, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> infoCode)</td></tr>
<tr class="memdesc:ga9221f9f631ead4b6f66cfcff8614ba46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set or reset error condition.  <a href="group__CO__Emergency.html#ga9221f9f631ead4b6f66cfcff8614ba46">More...</a><br /></td></tr>
<tr class="separator:ga9221f9f631ead4b6f66cfcff8614ba46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8e9bae71814a3e7bbd8d59d721174c2b"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#ga8e9bae71814a3e7bbd8d59d721174c2b">CO_isError</a> (<a class="el" href="structCO__EM__t.html">CO_EM_t</a> *em, const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> errorBit)</td></tr>
<tr class="memdesc:ga8e9bae71814a3e7bbd8d59d721174c2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check specific error condition.  <a href="group__CO__Emergency.html#ga8e9bae71814a3e7bbd8d59d721174c2b">More...</a><br /></td></tr>
<tr class="separator:ga8e9bae71814a3e7bbd8d59d721174c2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf0c47186d9e51fb91d48385a9f6bad6b"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#gaf0c47186d9e51fb91d48385a9f6bad6b">CO_getErrorRegister</a> (<a class="el" href="structCO__EM__t.html">CO_EM_t</a> *em)</td></tr>
<tr class="memdesc:gaf0c47186d9e51fb91d48385a9f6bad6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get error register.  <a href="group__CO__Emergency.html#gaf0c47186d9e51fb91d48385a9f6bad6b">More...</a><br /></td></tr>
<tr class="separator:gaf0c47186d9e51fb91d48385a9f6bad6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>CANopen Emergency protocol.</p>
<p>Error control and Emergency is used for control internal error state and for sending a CANopen Emergency message.</p>
<p>In case of error condition stack or application calls <a class="el" href="group__CO__Emergency.html#gab66d4a6daa5f7492704b56a46b135f71" title="Report error condition, for description of parameters see CO_error.">CO_errorReport()</a> function with indication of the error. Specific error condition is reported (with CANopen Emergency message) only the first time after it occurs. Internal state of specific error condition is indicated by internal bitfield variable, with space for maximum <a class="el" href="group__CO__STACK__CONFIG__EMERGENCY.html#gab87776d4802748671b234112263760af">CO_CONFIG_EM_ERR_STATUS_BITS_COUNT</a> bits. Meaning for each bit is described by <a class="el" href="group__CO__Emergency.html#ga587034df9d350c8e121c253f1d4eeacc">CO_EM_errorStatusBits_t</a>. Specific error condition can be reset by <a class="el" href="group__CO__Emergency.html#ga24e2a9311cf704ec6ed43b0ea730c4a3" title="Reset error condition, for description of parameters see CO_error.">CO_errorReset()</a> function. In that case Emergency message is sent with CO_EM_NO_ERROR indication.</p>
<p>Some error conditions are informative and some are critical. Critical error conditions set the corresponding bit in <a class="el" href="group__CO__Emergency.html#ga2cfc261cce03577083ee3f1a31d5e03c">CO_errorRegister_t</a>. Critical error conditions for generic error are specified by <a class="el" href="group__CO__STACK__CONFIG__EMERGENCY.html#gad6270eb7887b22c0365c304d7cf2c633">CO_CONFIG_ERR_CONDITION_GENERIC</a> macro. Similar macros are defined for other error bits in in <a class="el" href="group__CO__Emergency.html#ga2cfc261cce03577083ee3f1a31d5e03c">CO_errorRegister_t</a>.</p>
<h3>Emergency producer</h3>
<p>If <a class="el" href="group__CO__STACK__CONFIG__EMERGENCY.html#ga16aa1479ffd52a627d1053c20f844b62">CO_CONFIG_EM</a> has CO_CONFIG_EM_PRODUCER enabled, then CANopen Emergency message will be sent on each change of any error condition. Emergency message contents are:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Byte </th><th class="markdownTableHeadNone">Description  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">0..1 </td><td class="markdownTableBodyNone"><a class="el" href="group__CO__Emergency.html#ga0653c307fd6bc5238babf48e01c9fa02">CO_EM_errorCode_t</a>  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">2 </td><td class="markdownTableBodyNone"><a class="el" href="group__CO__Emergency.html#ga2cfc261cce03577083ee3f1a31d5e03c">CO_errorRegister_t</a>  </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">3 </td><td class="markdownTableBodyNone">Index of error condition (see <a class="el" href="group__CO__Emergency.html#ga587034df9d350c8e121c253f1d4eeacc">CO_EM_errorStatusBits_t</a>).  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">4..7 </td><td class="markdownTableBodyNone">Additional informative argument to <a class="el" href="group__CO__Emergency.html#gab66d4a6daa5f7492704b56a46b135f71" title="Report error condition, for description of parameters see CO_error.">CO_errorReport()</a> function.  </td></tr>
</table>
<h3>Error history</h3>
<p>If <a class="el" href="group__CO__STACK__CONFIG__EMERGENCY.html#ga16aa1479ffd52a627d1053c20f844b62">CO_CONFIG_EM</a> has CO_CONFIG_EM_HISTORY enabled, then latest errors can be read from <em>Pre Defined Error Field</em> (object dictionary, index 0x1003). Contents corresponds to bytes 0..3 from the Emergency message.</p>
<h3>Emergency consumer</h3>
<p>If <a class="el" href="group__CO__STACK__CONFIG__EMERGENCY.html#ga16aa1479ffd52a627d1053c20f844b62">CO_CONFIG_EM</a> has CO_CONFIG_EM_CONSUMER enabled, then callback can be registered by <a class="el" href="group__CO__Emergency.html#ga583245c954327c3cf7f9fdb97854e76b">CO_EM_initCallbackRx()</a> function. </p>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga2cfc261cce03577083ee3f1a31d5e03c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2cfc261cce03577083ee3f1a31d5e03c">&#9670;&nbsp;</a></span>CO_errorRegister_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__CO__Emergency.html#ga2cfc261cce03577083ee3f1a31d5e03c">CO_errorRegister_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>CANopen Error register. </p>
<p>Mandatory for CANopen, resides in object dictionary, index 0x1001.</p>
<p>Error register is calculated from internal bitfield variable, critical bits. See <a class="el" href="group__CO__Emergency.html#ga587034df9d350c8e121c253f1d4eeacc">CO_EM_errorStatusBits_t</a> and <a class="el" href="group__CO__STACK__CONFIG__EMERGENCY.html">Emergency producer/consumer</a> for error condition macros.</p>
<p>Internal errors may prevent device to stay in NMT Operational state and changes may switch between the states. See <a class="el" href="group__CO__NMT__Heartbeat.html#gaf92cf5943801e5dda84654345cc3d67f">CO_NMT_control_t</a> for details. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga2cfc261cce03577083ee3f1a31d5e03ca92a7e121ae04a022fc2fe604eb1c148e"></a>CO_ERR_REG_GENERIC_ERR&#160;</td><td class="fielddoc"><p>bit 0, generic error </p>
</td></tr>
<tr><td class="fieldname"><a id="gga2cfc261cce03577083ee3f1a31d5e03ca61eded29fb0fcd95b2f66c2682de0f2b"></a>CO_ERR_REG_CURRENT&#160;</td><td class="fielddoc"><p>bit 1, current </p>
</td></tr>
<tr><td class="fieldname"><a id="gga2cfc261cce03577083ee3f1a31d5e03ca360c75e04303d1c55e2bc8528407cb87"></a>CO_ERR_REG_VOLTAGE&#160;</td><td class="fielddoc"><p>bit 2, voltage </p>
</td></tr>
<tr><td class="fieldname"><a id="gga2cfc261cce03577083ee3f1a31d5e03cab12f2b419af0aeb8aae83a13d5c8b7bf"></a>CO_ERR_REG_TEMPERATURE&#160;</td><td class="fielddoc"><p>bit 3, temperature </p>
</td></tr>
<tr><td class="fieldname"><a id="gga2cfc261cce03577083ee3f1a31d5e03ca2f3b7aeac7282281c1d17895406c006a"></a>CO_ERR_REG_COMMUNICATION&#160;</td><td class="fielddoc"><p>bit 4, communication error </p>
</td></tr>
<tr><td class="fieldname"><a id="gga2cfc261cce03577083ee3f1a31d5e03cab137d1705e9ab20e2caeb22f57dd4716"></a>CO_ERR_REG_DEV_PROFILE&#160;</td><td class="fielddoc"><p>bit 5, device profile specific </p>
</td></tr>
<tr><td class="fieldname"><a id="gga2cfc261cce03577083ee3f1a31d5e03caffdf7f5d9f9ae52fa1bf97a3fb3d848b"></a>CO_ERR_REG_RESERVED&#160;</td><td class="fielddoc"><p>bit 6, reserved (always 0) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga2cfc261cce03577083ee3f1a31d5e03ca207eee1d9638f61166bc395ee71b84a3"></a>CO_ERR_REG_MANUFACTURER&#160;</td><td class="fielddoc"><p>bit 7, manufacturer specific </p>
</td></tr>
</table>

</div>
</div>
<a id="ga0653c307fd6bc5238babf48e01c9fa02"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0653c307fd6bc5238babf48e01c9fa02">&#9670;&nbsp;</a></span>CO_EM_errorCode_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__CO__Emergency.html#ga0653c307fd6bc5238babf48e01c9fa02">CO_EM_errorCode_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>CANopen Error code. </p>
<p>Standard error codes according to CiA DS-301 and DS-401. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02aa60e1333102cbe544eccbaad8e77f6f7"></a>CO_EMC_NO_ERROR&#160;</td><td class="fielddoc"><p>0x00xx, error Reset or No Error </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a2eaf45ca12b32b7bcc58df91becda767"></a>CO_EMC_GENERIC&#160;</td><td class="fielddoc"><p>0x10xx, Generic Error </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02abad9ca04a37cc43cacabfef9483699cf"></a>CO_EMC_CURRENT&#160;</td><td class="fielddoc"><p>0x20xx, Current </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02ab792c971a569d1175666b3fff9ffbe70"></a>CO_EMC_CURRENT_INPUT&#160;</td><td class="fielddoc"><p>0x21xx, Current, device input side </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a3ded1c05cbf37d2d7d286af97e833e65"></a>CO_EMC_CURRENT_INSIDE&#160;</td><td class="fielddoc"><p>0x22xx, Current inside the device </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02ad42e8ab666fd3da75d1fa3a7b8708efc"></a>CO_EMC_CURRENT_OUTPUT&#160;</td><td class="fielddoc"><p>0x23xx, Current, device output side </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a84a8f0dfb97e0ec13be9a4cdb0d71233"></a>CO_EMC_VOLTAGE&#160;</td><td class="fielddoc"><p>0x30xx, Voltage </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02ab4b095d1d9e7e7f5150bc2ecd83bc140"></a>CO_EMC_VOLTAGE_MAINS&#160;</td><td class="fielddoc"><p>0x31xx, Mains Voltage </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a78dfa1d496a010ae7ae2e8b6edc1362a"></a>CO_EMC_VOLTAGE_INSIDE&#160;</td><td class="fielddoc"><p>0x32xx, Voltage inside the device </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a9c5becd591c91bb3e255badf0a308c2d"></a>CO_EMC_VOLTAGE_OUTPUT&#160;</td><td class="fielddoc"><p>0x33xx, Output Voltage </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02aa24dfa4c6948187f62d3e8182285d4a3"></a>CO_EMC_TEMPERATURE&#160;</td><td class="fielddoc"><p>0x40xx, Temperature </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02ae5256d8178374a48750537c3d04c0a30"></a>CO_EMC_TEMP_AMBIENT&#160;</td><td class="fielddoc"><p>0x41xx, Ambient Temperature </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a6c29a4b49fae39b45c5c0e553ef6668f"></a>CO_EMC_TEMP_DEVICE&#160;</td><td class="fielddoc"><p>0x42xx, Device Temperature </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a33344d49b9667151d86aef28a73e6f66"></a>CO_EMC_HARDWARE&#160;</td><td class="fielddoc"><p>0x50xx, Device Hardware </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a6d0b3c0c31228e0bc57fc080c754fefa"></a>CO_EMC_SOFTWARE_DEVICE&#160;</td><td class="fielddoc"><p>0x60xx, Device Software </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a62e0949639733e85c2b6d4c8b099d467"></a>CO_EMC_SOFTWARE_INTERNAL&#160;</td><td class="fielddoc"><p>0x61xx, Internal Software </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a7b6ae38c015688128890bfe42b0271e5"></a>CO_EMC_SOFTWARE_USER&#160;</td><td class="fielddoc"><p>0x62xx, User Software </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02ad22329fc3e44867a365401458e691ddc"></a>CO_EMC_DATA_SET&#160;</td><td class="fielddoc"><p>0x63xx, Data Set </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02ae210dc1069c7b046527f7d7903ef82cb"></a>CO_EMC_ADDITIONAL_MODUL&#160;</td><td class="fielddoc"><p>0x70xx, Additional Modules </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a8ecd7e45af52d83d986e3de8e957a986"></a>CO_EMC_MONITORING&#160;</td><td class="fielddoc"><p>0x80xx, Monitoring </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02aab2946bf800f551bcae55dd299ff315b"></a>CO_EMC_COMMUNICATION&#160;</td><td class="fielddoc"><p>0x81xx, Communication </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a1f04b4ffe9cc1d8f2b294261909dec4e"></a>CO_EMC_CAN_OVERRUN&#160;</td><td class="fielddoc"><p>0x8110, CAN Overrun (Objects lost) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02aa024c00c21f705474355b9ca7d7ce948"></a>CO_EMC_CAN_PASSIVE&#160;</td><td class="fielddoc"><p>0x8120, CAN in Error Passive Mode </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02aff47b500e2e760355ca653b247e4b93f"></a>CO_EMC_HEARTBEAT&#160;</td><td class="fielddoc"><p>0x8130, Life Guard Error or Heartbeat Error </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a2fd717ed311007b4dd6fe92443f134b0"></a>CO_EMC_BUS_OFF_RECOVERED&#160;</td><td class="fielddoc"><p>0x8140, recovered from bus off </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a683bff5350b0cbab24aef2fc8eac363a"></a>CO_EMC_CAN_ID_COLLISION&#160;</td><td class="fielddoc"><p>0x8150, CAN-ID collision </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02ab884b23b23af9671d99cca5865549e5a"></a>CO_EMC_PROTOCOL_ERROR&#160;</td><td class="fielddoc"><p>0x82xx, Protocol Error </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a80fedd7bbb98ddf1ec26d4b31ed6d749"></a>CO_EMC_PDO_LENGTH&#160;</td><td class="fielddoc"><p>0x8210, PDO not processed due to length error </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a88bac871b7539a579fba73825a2e240a"></a>CO_EMC_PDO_LENGTH_EXC&#160;</td><td class="fielddoc"><p>0x8220, PDO length exceeded </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02ab58df03302ab06710f7455d37039dea3"></a>CO_EMC_DAM_MPDO&#160;</td><td class="fielddoc"><p>0x8230, DAM MPDO not processed, destination object not available </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a81aa2a66727d1fe29720067dc4e20879"></a>CO_EMC_SYNC_DATA_LENGTH&#160;</td><td class="fielddoc"><p>0x8240, Unexpected SYNC data length </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a4ca48c8d1be6a42ac0c13e551e12b230"></a>CO_EMC_RPDO_TIMEOUT&#160;</td><td class="fielddoc"><p>0x8250, RPDO timeout </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a018485be8125a3515ecd127a08e2e2f1"></a>CO_EMC_TIME_DATA_LENGTH&#160;</td><td class="fielddoc"><p>0x8260, Unexpected TIME data length </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a1d76eff88ebd6050377c393533aebc8d"></a>CO_EMC_EXTERNAL_ERROR&#160;</td><td class="fielddoc"><p>0x90xx, External Error </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02af5f9446049023ceae559562998172278"></a>CO_EMC_ADDITIONAL_FUNC&#160;</td><td class="fielddoc"><p>0xF0xx, Additional Functions </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02ad7b895b5e7d0f3fa7ff422157ac36c70"></a>CO_EMC_DEVICE_SPECIFIC&#160;</td><td class="fielddoc"><p>0xFFxx, Device specific </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02aa432d9c66bb0f6eecc38d720cae6c32e"></a>CO_EMC401_OUT_CUR_HI&#160;</td><td class="fielddoc"><p>0x2310, DS401, Current at outputs too high (overload) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a182a0c7afc0cb1c30af42a05430da353"></a>CO_EMC401_OUT_SHORTED&#160;</td><td class="fielddoc"><p>0x2320, DS401, Short circuit at outputs </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a21cd31a1455c9dc379796798f0eecd32"></a>CO_EMC401_OUT_LOAD_DUMP&#160;</td><td class="fielddoc"><p>0x2330, DS401, Load dump at outputs </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02aacdc3517e800b037b46c1b54f454b562"></a>CO_EMC401_IN_VOLT_HI&#160;</td><td class="fielddoc"><p>0x3110, DS401, Input voltage too high </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a867eb16fce01ade3c728df7c7527e311"></a>CO_EMC401_IN_VOLT_LOW&#160;</td><td class="fielddoc"><p>0x3120, DS401, Input voltage too low </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a9cd0f1a897f40a3a43198ba05de4a11b"></a>CO_EMC401_INTERN_VOLT_HI&#160;</td><td class="fielddoc"><p>0x3210, DS401, Internal voltage too high </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02ac122203ed5c6a71749ace599b13ac594"></a>CO_EMC401_INTERN_VOLT_LO&#160;</td><td class="fielddoc"><p>0x3220, DS401, Internal voltage too low </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02abf5b6a68120351c2fa52146b45798ed2"></a>CO_EMC401_OUT_VOLT_HIGH&#160;</td><td class="fielddoc"><p>0x3310, DS401, Output voltage too high </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0653c307fd6bc5238babf48e01c9fa02a5f262e622db7482b7230055e5b27c902"></a>CO_EMC401_OUT_VOLT_LOW&#160;</td><td class="fielddoc"><p>0x3320, DS401, Output voltage too low </p>
</td></tr>
</table>

</div>
</div>
<a id="ga587034df9d350c8e121c253f1d4eeacc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga587034df9d350c8e121c253f1d4eeacc">&#9670;&nbsp;</a></span>CO_EM_errorStatusBits_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__CO__Emergency.html#ga587034df9d350c8e121c253f1d4eeacc">CO_EM_errorStatusBits_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Error status bits. </p>
<p>Bits for internal indication of the error condition. Each error condition is specified by unique index from 0x00 up to 0xFF.</p>
<p>If specific error occurs in the stack or in the application, <a class="el" href="group__CO__Emergency.html#gab66d4a6daa5f7492704b56a46b135f71" title="Report error condition, for description of parameters see CO_error.">CO_errorReport()</a> sets specific bit in the <em>errorStatusBit</em> variable from <a class="el" href="structCO__EM__t.html">CO_EM_t</a>. If bit was already set, function returns without any action. Otherwise it prepares emergency message.</p>
<p>Maximum size (in bits) of the <em>errorStatusBit</em> variable is specified by <a class="el" href="group__CO__STACK__CONFIG__EMERGENCY.html#gab87776d4802748671b234112263760af">CO_CONFIG_EM_ERR_STATUS_BITS_COUNT</a> (set to 10*8 bits by default). Stack uses first 6 bytes. Additional 4 bytes are pre-defined for manufacturer or device specific error indications, by default. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccafb7b06b4b1d4fb2f9fa8661fdbaf8b01"></a>CO_EM_NO_ERROR&#160;</td><td class="fielddoc"><p>0x00, Error Reset or No Error </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca27ebb7f155d4b72618c34dd6aa496aac"></a>CO_EM_CAN_BUS_WARNING&#160;</td><td class="fielddoc"><p>0x01, communication, info, CAN bus warning limit reached </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccae1e45de61059459a6f1f6e500962f287"></a>CO_EM_RXMSG_WRONG_LENGTH&#160;</td><td class="fielddoc"><p>0x02, communication, info, Wrong data length of the received CAN message </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca0b17027ee0097065d92e6c0981e3face"></a>CO_EM_RXMSG_OVERFLOW&#160;</td><td class="fielddoc"><p>0x03, communication, info, Previous received CAN message wasn't processed yet </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca2a36480d4dd6a24f1f8bb66d79441a8d"></a>CO_EM_RPDO_WRONG_LENGTH&#160;</td><td class="fielddoc"><p>0x04, communication, info, Wrong data length of received PDO </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca73426de91d49273d023b5084a0cea8e0"></a>CO_EM_RPDO_OVERFLOW&#160;</td><td class="fielddoc"><p>0x05, communication, info, Previous received PDO wasn't processed yet </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccaab5efa11cefb2cd6125cec3ec1c570e1"></a>CO_EM_CAN_RX_BUS_PASSIVE&#160;</td><td class="fielddoc"><p>0x06, communication, info, CAN receive bus is passive </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccadb8502da626d80a8c423e94e1c76d0cb"></a>CO_EM_CAN_TX_BUS_PASSIVE&#160;</td><td class="fielddoc"><p>0x07, communication, info, CAN transmit bus is passive </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccac5f82aeeda52c83eee0025c8b387ac5d"></a>CO_EM_NMT_WRONG_COMMAND&#160;</td><td class="fielddoc"><p>0x08, communication, info, Wrong NMT command received </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca5c1a6209ebe6167bbf13f565b6fd994d"></a>CO_EM_TIME_TIMEOUT&#160;</td><td class="fielddoc"><p>0x09, communication, info, TIME message timeout </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca3af179820ed2aa88e2c22b7961de71f8"></a>CO_EM_TIME_LENGTH&#160;</td><td class="fielddoc"><p>0x0A, communication, info, Unexpected TIME data length </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca8bf6fb0db21e29e477b38304279bed5e"></a>CO_EM_0B_unused&#160;</td><td class="fielddoc"><p>0x0B, communication, info, (unused) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccaa724f4fdeff7043b0d4f454613a96992"></a>CO_EM_0C_unused&#160;</td><td class="fielddoc"><p>0x0C, communication, info, (unused) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca933c070fd08c1223462a3a331b016c99"></a>CO_EM_0D_unused&#160;</td><td class="fielddoc"><p>0x0D, communication, info, (unused) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca0cabb2e45202f938cfdafe8e7871f4f7"></a>CO_EM_0E_unused&#160;</td><td class="fielddoc"><p>0x0E, communication, info, (unused) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccac6469cc3e6176136f69e549c4a4f5b71"></a>CO_EM_0F_unused&#160;</td><td class="fielddoc"><p>0x0F, communication, info, (unused) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca274f46ac0760c4c340f48d1de884f2fe"></a>CO_EM_10_unused&#160;</td><td class="fielddoc"><p>0x10, communication, critical, (unused) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca9d8abe2f426ed071febf85a932c1df98"></a>CO_EM_11_unused&#160;</td><td class="fielddoc"><p>0x11, communication, critical, (unused) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccae59f8e20795915a0929861809ed42e7c"></a>CO_EM_CAN_TX_BUS_OFF&#160;</td><td class="fielddoc"><p>0x12, communication, critical, CAN transmit bus is off </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccaf9a86c6c3b87763593dd14be6b0bef29"></a>CO_EM_CAN_RXB_OVERFLOW&#160;</td><td class="fielddoc"><p>0x13, communication, critical, CAN module receive buffer has overflowed </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca2dbceee7b6deae231bb40a96f8f748a9"></a>CO_EM_CAN_TX_OVERFLOW&#160;</td><td class="fielddoc"><p>0x14, communication, critical, CAN transmit buffer has overflowed </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccaea141284cd85126a9b3e7b0605a26a94"></a>CO_EM_TPDO_OUTSIDE_WINDOW&#160;</td><td class="fielddoc"><p>0x15, communication, critical, TPDO is outside SYNC window </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca865160ae9fdac8fcba1e5335b31c2f9f"></a>CO_EM_16_unused&#160;</td><td class="fielddoc"><p>0x16, communication, critical, (unused) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccad5bb584bb3c85ca0ba0313367aa75a9b"></a>CO_EM_17_unused&#160;</td><td class="fielddoc"><p>0x17, communication, critical, (unused) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccafd760392f4d4d6358896486c5b5d7d82"></a>CO_EM_SYNC_TIME_OUT&#160;</td><td class="fielddoc"><p>0x18, communication, critical, SYNC message timeout </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca09a521bfc9ea08ed340cfa29952a471c"></a>CO_EM_SYNC_LENGTH&#160;</td><td class="fielddoc"><p>0x19, communication, critical, Unexpected SYNC data length </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca7308b487766b8feca60ef0c1b873f167"></a>CO_EM_PDO_WRONG_MAPPING&#160;</td><td class="fielddoc"><p>0x1A, communication, critical, Error with PDO mapping </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca6478d414ea45f6a9129e68a9d57e11b7"></a>CO_EM_HEARTBEAT_CONSUMER&#160;</td><td class="fielddoc"><p>0x1B, communication, critical, Heartbeat consumer timeout </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca0b6698662476cc622661fb5a5a75ec31"></a>CO_EM_HB_CONSUMER_REMOTE_RESET&#160;</td><td class="fielddoc"><p>0x1C, communication, critical, Heartbeat consumer detected remote node reset </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca6d0bf9c926241ec8f67c477928300761"></a>CO_EM_1D_unused&#160;</td><td class="fielddoc"><p>0x1D, communication, critical, (unused) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccab2f3562c4e1f8e25a7837627dc1721db"></a>CO_EM_1E_unused&#160;</td><td class="fielddoc"><p>0x1E, communication, critical, (unused) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccadba4afb9dac78f8eb0c5f494926568b1"></a>CO_EM_1F_unused&#160;</td><td class="fielddoc"><p>0x1F, communication, critical, (unused) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccabd1935c51679f70f509ffd60e28c02b1"></a>CO_EM_EMERGENCY_BUFFER_FULL&#160;</td><td class="fielddoc"><p>0x20, generic, info, Emergency buffer is full, Emergency message wasn't sent </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccadbce7bd9d5a0ee681104914092b21d8d"></a>CO_EM_21_unused&#160;</td><td class="fielddoc"><p>0x21, generic, info, (unused) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccacb69eecc08e72c56aec215fa55e27e16"></a>CO_EM_MICROCONTROLLER_RESET&#160;</td><td class="fielddoc"><p>0x22, generic, info, Microcontroller has just started </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccaa0c8857afdd8455b30fd0179e98599fb"></a>CO_EM_23_unused&#160;</td><td class="fielddoc"><p>0x23, generic, info, (unused) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca9cf88b48355b3cc43fe9a8360b8470df"></a>CO_EM_24_unused&#160;</td><td class="fielddoc"><p>0x24, generic, info, (unused) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca0a8abc6fcd7b0d5469b469c2cf370a82"></a>CO_EM_25_unused&#160;</td><td class="fielddoc"><p>0x25, generic, info, (unused) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca0398195eafec5f8d60a76f677ce2a714"></a>CO_EM_26_unused&#160;</td><td class="fielddoc"><p>0x26, generic, info, (unused) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca95ca6848349affc579fff2c2a62e87d7"></a>CO_EM_27_unused&#160;</td><td class="fielddoc"><p>0x27, generic, info, (unused) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca2d7776243205bc75e6c448e13e697480"></a>CO_EM_WRONG_ERROR_REPORT&#160;</td><td class="fielddoc"><p>0x28, generic, critical, Wrong parameters to <a class="el" href="group__CO__Emergency.html#gab66d4a6daa5f7492704b56a46b135f71" title="Report error condition, for description of parameters see CO_error.">CO_errorReport()</a> function </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccadbf7382f537c9f59f965ce38be464e46"></a>CO_EM_ISR_TIMER_OVERFLOW&#160;</td><td class="fielddoc"><p>0x29, generic, critical, Timer task has overflowed </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca2575dac21ff9ac9c4c4e5ca63d34fdbc"></a>CO_EM_MEMORY_ALLOCATION_ERROR&#160;</td><td class="fielddoc"><p>0x2A, generic, critical, Unable to allocate memory for objects </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca21648a2863590d3cccb469f8ef759267"></a>CO_EM_GENERIC_ERROR&#160;</td><td class="fielddoc"><p>0x2B, generic, critical, Generic error, test usage </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca6c3e7fff310443f05815ea2b7ac6b289"></a>CO_EM_GENERIC_SOFTWARE_ERROR&#160;</td><td class="fielddoc"><p>0x2C, generic, critical, Software error </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca2c6a108cabca6f03b1400065f2ad4887"></a>CO_EM_INCONSISTENT_OBJECT_DICT&#160;</td><td class="fielddoc"><p>0x2D, generic, critical, Object dictionary does not match the software </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca5544a90d3047bc08186ea7412528dc93"></a>CO_EM_CALCULATION_OF_PARAMETERS&#160;</td><td class="fielddoc"><p>0x2E, generic, critical, Error in calculation of device parameters </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccac019532cacaa8310f9ca413a2f599af3"></a>CO_EM_NON_VOLATILE_MEMORY&#160;</td><td class="fielddoc"><p>0x2F, generic, critical, Error with access to non volatile device memory </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeaccaf850a661aadde65b10b22715cf24942c"></a>CO_EM_MANUFACTURER_START&#160;</td><td class="fielddoc"><p>0x30+, manufacturer, info or critical, Error status buts, free to use by manufacturer. </p>
<p>By default bits 0x30..0x3F are set as informational and bits 0x40..0x4F are set as critical. Manufacturer critical bits sets the error register, as specified by <a class="el" href="group__CO__STACK__CONFIG__EMERGENCY.html#ga3717ce44b5db3189757d874f440adce1">CO_CONFIG_ERR_CONDITION_MANUFACTURER</a> </p>
</td></tr>
<tr><td class="fieldname"><a id="gga587034df9d350c8e121c253f1d4eeacca5d3c6fdb77551b3f4aaf993ae1dfb414"></a>CO_EM_MANUFACTURER_END&#160;</td><td class="fielddoc"><p>(<a class="el" href="group__CO__STACK__CONFIG__EMERGENCY.html#gab87776d4802748671b234112263760af">CO_CONFIG_EM_ERR_STATUS_BITS_COUNT</a> - 1), largest value of the Error status bit. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga5b80f59df00b71dca7a5c18c139aa71e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5b80f59df00b71dca7a5c18c139aa71e">&#9670;&nbsp;</a></span>CO_EM_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_EM_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__EM__t.html">CO_EM_t</a> *&#160;</td>
          <td class="paramname"><em>em</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structOD__entry__t.html">OD_entry_t</a> *&#160;</td>
          <td class="paramname"><em>OD_1001_errReg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structOD__entry__t.html">OD_entry_t</a> *&#160;</td>
          <td class="paramname"><em>OD_1014_cobIdEm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANdevTx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANdevTxIdx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structOD__entry__t.html">OD_entry_t</a> *&#160;</td>
          <td class="paramname"><em>OD_1015_InhTime</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structOD__entry__t.html">OD_entry_t</a> *&#160;</td>
          <td class="paramname"><em>OD_1003_preDefErr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structOD__entry__t.html">OD_entry_t</a> *&#160;</td>
          <td class="paramname"><em>OD_statusBits</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANdevRx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANdevRxIdx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nodeId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize Emergency object. </p>
<p>Function must be called in the communication reset section.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">em</td><td>This object will be initialized. </td></tr>
    <tr><td class="paramname">OD_1001_errReg</td><td>OD entry for 0x1001 - "Error register", entry is required, without IO extension. </td></tr>
    <tr><td class="paramname">OD_1014_cobIdEm</td><td>OD entry for 0x1014 - "COB-ID EMCY", entry is required, IO extension is required. </td></tr>
    <tr><td class="paramname">CANdevTx</td><td>CAN device for Emergency transmission. </td></tr>
    <tr><td class="paramname">CANdevTxIdx</td><td>Index of transmit buffer in the above CAN device. </td></tr>
    <tr><td class="paramname">OD_1015_InhTime</td><td>OD entry for 0x1015 - "Inhibit time EMCY", entry is optional (can be NULL), IO extension is optional for runtime configuration. </td></tr>
    <tr><td class="paramname">OD_1003_preDefErr</td><td>OD entry for 0x1003 - "Pre-defined error field". Emergency object has own memory buffer for this entry. Entry is optional, IO extension is required. </td></tr>
    <tr><td class="paramname">OD_statusBits</td><td>Custom OD entry for accessing errorStatusBits from <a class="el" href="structCO__EM__t.html">CO_EM_t</a>. Entry must have variable of size (CO_CONFIG_EM_ERR_STATUS_BITS_COUNT/8) bytes available for read/write access on subindex 0. Emergency object has own memory buffer for this entry. Entry is optional, IO extension is required. </td></tr>
    <tr><td class="paramname">CANdevRx</td><td>CAN device for Emergency consumer reception. </td></tr>
    <tr><td class="paramname">CANdevRxIdx</td><td>Index of receive buffer in the above CAN device. </td></tr>
    <tr><td class="paramname">nodeId</td><td>CANopen node ID of this device (for default emergency producer)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_ERROR_NO in case of success. </dd></dl>

</div>
</div>
<a id="ga94efd78032de3667e2a89780b08aabed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga94efd78032de3667e2a89780b08aabed">&#9670;&nbsp;</a></span>CO_EM_initCallbackPre()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_EM_initCallbackPre </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__EM__t.html">CO_EM_t</a> *&#160;</td>
          <td class="paramname"><em>em</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(void *object)&#160;</td>
          <td class="paramname"><em>pFunctSignal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize Emergency callback function. </p>
<p>Function initializes optional callback function, which should immediately start processing of <a class="el" href="group__CO__Emergency.html#ga93ae7be6ef966192f5761ce343345d3b" title="Process Error control and Emergency object.">CO_EM_process()</a> function. Callback is called from <a class="el" href="group__CO__Emergency.html#gab66d4a6daa5f7492704b56a46b135f71" title="Report error condition, for description of parameters see CO_error.">CO_errorReport()</a> or <a class="el" href="group__CO__Emergency.html#ga24e2a9311cf704ec6ed43b0ea730c4a3" title="Reset error condition, for description of parameters see CO_error.">CO_errorReset()</a> function. Those functions are fast and may be called from any thread. Callback should immediately start mainline thread, which calls <a class="el" href="group__CO__Emergency.html#ga93ae7be6ef966192f5761ce343345d3b" title="Process Error control and Emergency object.">CO_EM_process()</a> function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">em</td><td>This object. </td></tr>
    <tr><td class="paramname">object</td><td>Pointer to object, which will be passed to pFunctSignal(). Can be NULL </td></tr>
    <tr><td class="paramname">pFunctSignal</td><td>Pointer to the callback function. Not called if NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga583245c954327c3cf7f9fdb97854e76b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga583245c954327c3cf7f9fdb97854e76b">&#9670;&nbsp;</a></span>CO_EM_initCallbackRx()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_EM_initCallbackRx </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__EM__t.html">CO_EM_t</a> *&#160;</td>
          <td class="paramname"><em>em</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(const <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> ident, const <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> errorCode, const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> errorRegister, const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> errorBit, const <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> infoCode)&#160;</td>
          <td class="paramname"><em>pFunctSignalRx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize Emergency received callback function. </p>
<p>Function initializes optional callback function, which executes after error condition is received.</p>
<p><em>ident</em> argument from callback contains CAN-ID of the emergency message. If <em>ident</em> == 0, then emergency message was sent from this device.</p>
<dl class="section remark"><dt>Remarks</dt><dd>Depending on the CAN driver implementation, this function is called inside an ISR or inside a mainline. Must be thread safe.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">em</td><td>This object. </td></tr>
    <tr><td class="paramname">pFunctSignalRx</td><td>Pointer to the callback function. Not called if NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga93ae7be6ef966192f5761ce343345d3b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga93ae7be6ef966192f5761ce343345d3b">&#9670;&nbsp;</a></span>CO_EM_process()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_EM_process </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__EM__t.html">CO_EM_t</a> *&#160;</td>
          <td class="paramname"><em>em</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td>
          <td class="paramname"><em>NMTisPreOrOperational</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>timeDifference_us</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *&#160;</td>
          <td class="paramname"><em>timerNext_us</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process Error control and Emergency object. </p>
<p>Function must be called cyclically. It verifies some communication errors, calculates OD object 0x1001 - "Error register" and sends emergency message if necessary.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">em</td><td>This object. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">NMTisPreOrOperational</td><td>True if this node is NMT_PRE_OPERATIONAL or NMT_OPERATIONAL state. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">timeDifference_us</td><td>Time difference from previous function call in [microseconds]. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">timerNext_us</td><td>info to OS - see <a class="el" href="group__CO__CANopen.html#ga895d7fad40b60aacdac3cb0615729b5e" title="Process CANopen objects.">CO_process()</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga9221f9f631ead4b6f66cfcff8614ba46"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9221f9f631ead4b6f66cfcff8614ba46">&#9670;&nbsp;</a></span>CO_error()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_error </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__EM__t.html">CO_EM_t</a> *&#160;</td>
          <td class="paramname"><em>em</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td>
          <td class="paramname"><em>setError</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>errorBit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>errorCode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>infoCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set or reset error condition. </p>
<p>Function can be called on any error condition inside CANopen stack or application. Function first checks change of error condition (setError is true and error bit wasn't set or setError is false and error bit was set before). If changed, then Emergency message is prepared and record in history is added. Emergency message is later sent by <a class="el" href="group__CO__Emergency.html#ga93ae7be6ef966192f5761ce343345d3b" title="Process Error control and Emergency object.">CO_EM_process()</a> function.</p>
<p>Function is short and thread safe.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">em</td><td>Emergency object. </td></tr>
    <tr><td class="paramname">setError</td><td>True if error occurred or false if error resolved. </td></tr>
    <tr><td class="paramname">errorBit</td><td>from <a class="el" href="group__CO__Emergency.html#ga587034df9d350c8e121c253f1d4eeacc">CO_EM_errorStatusBits_t</a>. </td></tr>
    <tr><td class="paramname">errorCode</td><td>from <a class="el" href="group__CO__Emergency.html#ga0653c307fd6bc5238babf48e01c9fa02">CO_EM_errorCode_t</a>. </td></tr>
    <tr><td class="paramname">infoCode</td><td>32 bit value is passed to bytes 4...7 of the Emergency message. It contains optional additional information. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga8e9bae71814a3e7bbd8d59d721174c2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8e9bae71814a3e7bbd8d59d721174c2b">&#9670;&nbsp;</a></span>CO_isError()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> CO_isError </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__EM__t.html">CO_EM_t</a> *&#160;</td>
          <td class="paramname"><em>em</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>errorBit</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Check specific error condition. </p>
<p>Function returns true, if specific internal error is present.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">em</td><td>Emergency object. </td></tr>
    <tr><td class="paramname">errorBit</td><td>from <a class="el" href="group__CO__Emergency.html#ga587034df9d350c8e121c253f1d4eeacc">CO_EM_errorStatusBits_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if Error is present. </dd></dl>

</div>
</div>
<a id="gaf0c47186d9e51fb91d48385a9f6bad6b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf0c47186d9e51fb91d48385a9f6bad6b">&#9670;&nbsp;</a></span>CO_getErrorRegister()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> CO_getErrorRegister </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__EM__t.html">CO_EM_t</a> *&#160;</td>
          <td class="paramname"><em>em</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get error register. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">em</td><td>Emergency object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Error register or 0 if doesn't exist. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Thu Dec 24 2020 14:30:50 for CANopenNode by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
